
<div align="center">
    <?php
    $media_types = Yii::app()->params['media_types'];
    $tmp = '';
    foreach ($media_types as $type) {
        foreach ($type as $tp) {
            $tmp .= "{$tp};";
        }
    }
    $media_types = $tmp;
    $this->widget('application.extensions.uploadify.EuploadifyWidget', array(
        'name'=>'uploadme',
        'options'=> array(
        'script' => $this->createUrl('uploading'),
        'auto' => true,
        'multi' => true,
        'folder' => 'upload/media/',
        'scriptData' => array('media_category_id' => $media_category_id, 'PHPSESSID' => session_id()),
        'fileDesc' => $media_types,
        'fileExt' => $media_types,
        'buttonText' => 'Uploading',
        'buttonImg' => Yii::app()->baseUrl . '/assets/backend/images/upload.png',
        'width' => 128,
        'height' => 128,
        ),
        'callbacks' => array(
            'onError' => 'function(evt,queueId,fileObj,errorObj){alert("Error: " + errorObj.type + "\nInfo: " + errorObj.info);}',
            'onComplete' => 'function(event, queueID, fileObj, response, data){if (parseInt(response) != 1) { alert(response);} ;}',
            'onCancel' => 'function(evt,queueId,fileObj,data){alert("Cancelled");}',
        )
    ));
    ?>
</div>